<%-- 
    Document   : temp
    Created on : Oct 11, 2013, 10:09:53 AM
    Author     : NGUYEN
--%>

<%@page import="DTO.DONHANGDTO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="DAO.DONHANGDAO"%>
<%@page import="DTO.KHACHHANGDTO"%>
<%@page import="DAO.KHACHHANGDAO"%>
<%@page import="DTO.NHANVIENDTO"%>
<%@page import="DAO.NHANVIENDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>ThemDonHang</title>
        <script language="javascript" type="text/javascript">
            function showMenu(isShow, idSubMenu)
            {
                var subMenu = document.getElementById(idSubMenu);
                if (isShow == true)
                    subMenu.style.visibility = "visible"
                else
                    subMenu.style.visibility = "hidden"
            }
        </script>
        <style type="text/css">
            .menu
            {
                position:absolute;
                visibility:hidden;
            }


        </style>
    </head>


    <body>
        <table width="800" border="1" align="center">
            <!--header-->
            <jsp:include page="header.jsp"/>
            <!--header end-->

            <!--menu-->
            <jsp:include page="menu.jsp"/>
            <!--menu end-->
            <tr>

                <td height="255" align="center" valign="top">
                    <p>&nbsp;</p>
                    <p><font color="#0000FF" size="5">THÊM ĐƠN HÀNG</font></p>
                    <form id="form1" name="form1" method="post" action="themdonhang">
                        <table>
                            <tr>
                                <td><div align="right"><strong>Tên Nhân Viên:</strong></div></td>
                                <td>
                                    <label>
                                        <select name="selectNV" style="width:150px">
                                            <%
                                                ArrayList<NHANVIENDTO> ds;
                                                ds = new ArrayList<NHANVIENDTO>();
                                                NHANVIENDAO dao;
                                                dao = new NHANVIENDAO();
                                                ds = dao.laydanhsachnhanvien();
                                                if (ds.size() == 0) {
                                                } else {
                                                    for (int i = 0; i < ds.size(); i++) {
                                                        int manv = ds.get(i).getManv();
                                                        String tennv = ds.get(i).getTennv();
                                            %>
                                            <option value="<%=manv%>"><%=tennv%></option>
                                            <%
                                                    }
                                                }
                                            %>
                                        </select>
                                    </label>
                                </td>
                            </tr>
                            <tr>
                                <td width="279"><div align="right"><strong>Tên Khách Hàng:</strong></div></td>
                                <td>
                                    <label>
                                        <select name="selectKH" style="width:150px">
                                            <%
                                                ArrayList<KHACHHANGDTO> dss;
                                                dss = new ArrayList<KHACHHANGDTO>();
                                                KHACHHANGDAO daoo;
                                                daoo = new KHACHHANGDAO();
                                                dss = daoo.list_khachhang();
                                                if (dss.size() == 0) {
                                                } else {
                                                    for (int i = 0; i < dss.size(); i++) {
                                                        int makh = dss.get(i).getMakh();
                                                        String tenkh = dss.get(i).getTenkh();
                                            %>
                                            <option value="<%=makh%>"><%=tenkh%></option>
                                            <%
                                                    }
                                                }
                                            %>
                                        </select>
                                    </label>
                            </tr>
                            <tr>
                                <td><p>nhap theo dinh dang: ngay-thang-nam</p><div align="right"><strong>Ngày lập:</strong></div></td>
                                <td><input style="width:150px" name="textNL" type="text" /></td>
                            </tr>


                            <tr>
                                <td><div align="right"><strong>Tổng Tiền:</strong></div></td>
                                <td><input style="width:150px" name="textTT" type="text" /></td>
                            </tr>

                            <tr>
                                <td>
                                    <input type="submit" value="Thêm" name="btThem" /> 
                                </td>
                                <td>
                                    <input type="reset" value="Xóa" name="btXoa" />
                                </td>
                            </tr>

                        </table>

                    </form>
                </td>
            </tr>
            <!--footer-->
            <jsp:include page="footer.jsp"/>
            <!--footer end-->
        </table>

    </body>
</html>


